//
//  DiscoverLeanCloudWebViewController.m
//  Wifi
//
//  Created by srulos on 2017/6/15.
//  Copyright © 2017年 srulos. All rights reserved.
//

#import "DiscoverLeanCloudWebViewController.h"
#import "WifiHeader.h"

@interface DiscoverLeanCloudWebViewController ()<UIWebViewDelegate>

@end

@implementation DiscoverLeanCloudWebViewController
@synthesize m_url;

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:self action:@selector(onDismiss)];
    
    _m_webView.delegate = self;
    [_m_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:m_url]]];
    SHOW_HUD(K_NSLOCAL(@"loading"));
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)webViewDidStartLoad:(UIWebView *)webView{
    
}

- (void)webViewDidFinishLoad:(UIWebView *)webView{
    HIDE_HUD;
}

- (void)onDismiss
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
